{extend name="public/base" /} {block name="body"}
<div class="content-tabs">
	<ol class="breadcrumb">
		<li>
			<a href="{:url('index/index')}"><i class="fa fa-home"></i></a>
		</li>
		<li>  <strong> 会员列表 </strong> </li>
	</ol>
</div>
<div class="ibox float-e-margins">
	<div class="ibox-content">
	<form id="myForm" class="form-horizontal m-t" method="post" action="{:url('index')}">	
		<div class="form-group" >
		
                    
				用户名称<input type="text" id="name" name="name" value="" placeholder="请输入用户名称" class="bank"/>
			
				手机号码<input type="text" id="mobile" name="mobile" value="" placeholder="请输入手机号" class="bank" />
			     <select name="type" class="bank" > 
         				<option value="0">请选择用户类型</option>
                        <option value="1">普通会员</option>
                        <option value="2">代理商</option>
                        <option value="3">合伙人</option>
                    </select>
         			
                
				开始时间<input id='start_time' name='add_time'  onclick='WdatePicker()' type='text' placeholder="开始时间" class="bank" />
				
				
				<span ><button type="submit" class="btn btn-sm btn-primary"> 查询</button> </span>
		
		</div>
		</from>
		<div class="hr-line-dashed"></div>
		<div class="example-wrap">
			<div class="example">
				<form method="post" action="{:url('index')}">
					<table class="table table-bordered table-hover">
						<thead>
							<tr class="long-th">
								<th width="50">
									<input type="checkbox" class="check-all">
								</th>
								<th>姓名</th>
								<th>手机号码</th>
								<th style="width:80px;">用户类型</th>
								<th>合伙人ID</th>
								<th>上级</th>
								<th>一级</th>
								<th>二级</th>
								<th>余额</th>
								<th>积分</th>
								<th>状态</th>
								<th>创建时间</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
							{foreach name="list" item="vo"}
							<tr>
								<td class="text-center">
									{if condition="$vo.id neq 1"}<input type="checkbox" name="ids[]" value="{$vo.id}">{/if}
								</td>
								<td class="text-center">{$vo.nick_name}</td>
								<td class="text-center">{$vo.mobile}</td>
								<td class="text-center">
                        			{if $vo.agent_type == 1}
                        			普通用户
                        			{elseif $vo.agent_type == 2}
                        			代理商
                        			{else}
                        			合伙人	
                        			{/if}
                        			
                        		</td>
                        		<td class="text-center">{$vo.pt_id}</td>
								<td class="text-center">{$vo.pid}</td>
								<td class="text-center">{if $vo.le1}{$vo.le1}{else}0{/if}</td>
								<td class="text-center">{if $vo.le1}{$vo.le2}{else}0{/if}</td>
								<td class="text-center">{$vo.credit2}</td>
								<td class="text-center">{$vo.credit1}</td>
								<td class="text-center">
                        			<a href="{:url('edit',['id'=>$vo.id, 'status'=>$vo.status])}" class="btn btn-primary bnt-sm ajax-do">
										<i class="fa fa-paste"></i>                         			
										{if $vo.status == 0}
	                        			激活
	                        			{else}
	                        			冻结
	                        			{/if}</a>
                        		</td>
								<td class="text-center">{$vo.add_time}</td>
								<td class="text-center">
									<a href="{:url('update',['id'=>$vo.id])}" class="btn btn-primary bnt-sm">
										<i class="fa fa-paste"></i> 编辑</a>&nbsp;&nbsp;
									<a href="{:url('setup',['id'=>$vo.id,'pid'=>$pid])}" class="btn btn-primary bnt-sm">
										<i class="fa fa-paste"></i> 设置为上级</a>
								</td>
							</tr>
							{/foreach}
						</tbody>
					</table>
					<div style="text-align: right;">
                   		{$list->render()}
                    </div>
				</form>
			</div>
		</div>
	</div>
</div>
{/block} {block name="script"}
<script src="__JS__/jquery.form.js"></script>
<script src="__LIB__/validate/jquery.validate.min.js"></script>
<script src="__LIB__/validate/messages_zh.min.js"></script>
<script src="__LIB__/validate/add_validate.min.js"></script>
<script src="__LIB__/fileinput/js/fileinput.min.js"></script>
<script src="__LIB__/fileinput/js/locales/zh.js"></script>
<script src="__LIB__/datepicker/WdatePicker.js"></script>
<script>
	$(function() {
		$("#myForm").validate({
			rules: {
				
			},
			messages: {
				
			},
			
		});
	});
	function edit(){
		var tel=prompt('请输入手机号码','');
    
		if(tel){
		window.location.href ="set/tel/"+tel;
		
		}else{
		}
	}
</script>
<style>
.bank{
	width: 150px;
    height:30px;
    text-align:center;
    border-radius:5px;
    display:inline;
}
</style>
{/block}
